package com.fuxin.hanfu.service;

import com.fuxin.hanfu.domain.ItemOrder;
import com.fuxin.hanfu.mapper.ItemOrderMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ItemOrderService {
    @Resource
    private ItemOrderMapper itemOrderMapper;
    /*查看订单*/
    public List<ItemOrder> findList(ItemOrder itemOrder) {
        return itemOrderMapper.findList(itemOrder);
    }

    public ItemOrder findById(Integer id) {
        return itemOrderMapper.findById(id);
    }

    public Integer insert(ItemOrder itemOrder) {
        return itemOrderMapper.insert(itemOrder);
    }

    public Integer update(ItemOrder itemOrder) {
        return itemOrderMapper.update(itemOrder);
    }

    public Integer delete(Integer id) {
        return itemOrderMapper.delete(id);
    }

    /*发货*/
    public Integer shipOrder(Integer id) {
        return itemOrderMapper.shipOrder(id);
    }
    /*收货*/
    public Integer receiveOrder(Integer id) {
        return itemOrderMapper.receiveOrder(id);
    }

    /*付款*/
    public Integer payOrder(Integer id) {
        return itemOrderMapper.payOrder(id);
    }
    /*取消订单*/
    public Integer cancelOrder(Integer id) {
        return itemOrderMapper.cancelOrder(id);
    }
    /*前台-我的订单 查询*/
    public List<ItemOrder> findOrdersByStatus(String status) {
        return itemOrderMapper.findOrdersByStatus(status);
    }

}
